﻿#ifndef LOGINFORM_H
#define LOGINFORM_H

#include <QWidget>
#include "registerform.h"

namespace Ui {
class LoginForm;
}

class LoginForm : public QWidget
{
    Q_OBJECT
signals:
    void signalUserRegisterLogin(QStringList parameters);
    void signalUserLogin(QStringList parameters);

public:
    explicit LoginForm(QWidget *parent = nullptr);
    ~LoginForm();

    void FailUserLogin(QString msg);
    void FailUserRegister(QString msg);
    void SuccessUserRegister(QString msg);

private slots:
    void on_pb_register_clicked();
    void on_pb_login_clicked();

private:
    Ui::LoginForm *ui;
    RegisterForm *m_registerForm;

    bool m_isOkLogin;

    bool checkUserID(const QString &arg1);
    bool checkPassword(const QString &arg1);
};

#endif // LOGINFORM_H
